const mongoose = require('mongoose');
const { customers } = require('./data/customer');

// 创建数据结构
const customerSchema = new mongoose.Schema({
    username:String,
    password:String,
})

// 创建数据模型
const customerModel = mongoose.model('customers',customerSchema,'customers');

// 创建连接
mongoose.connect('mongodb://tangzhenhua:Lovo123456@182.92.214.223:8084/chenpeng',
{
    useNewUrlParser: true,
    useUnifiedTopology: true,
    auth: { authSource: "admin" }
},

async ()=>{
    // 创建影院数据
    await customerModel.create(customers);
})
